package com.hyd.dao.database;

import java.util.ArrayList;
import java.util.List;

/**
 * DAO 内部使用的分页查询结果
 */
public class PageResult<T> {

    private int totalSize;

    private List<T> result = new ArrayList<T>();

    public int getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(int totalSize) {
        this.totalSize = totalSize;
    }

    public List<T> getResult() {
        return result;
    }

    public void setResult(List<T> result) {
        this.result = result;
    }

    public int size() {
        return result == null ? 0 : result.size();
    }

    public void add(T row) {
        result.add(row);
    }
}
